@import (reference) 'src/style/mixins';

.scroll {
  height: 100%;
  position: relative;
  width: 100%;

  &__clipper {
    overflow: hidden;
    position: relative;
  }

  &__scroller {
    border: 0;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    height: 100%;
    margin: 0;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    overflow: scroll;
    padding: 0;
    width: 100%;
  }

  &__track {
    @offset: 0px;
    @size: 3px;

    display: none;
    position: absolute;
    transition: background-color @animation;

    .html_light & {
      background-color: @c-black-9;
    }

    .html_dark & {
      background-color: @c-white-5;
    }

    &_h {
      bottom: @offset;
      height: @size - 2 * @offset;
      right: @offset;
      left: @offset;
    }

    &_v {
      bottom: @offset;
      right: @offset;
      top: @offset;
      width: @size - 2 * @offset;
    }
  }

  &__free {
    bottom: 0;
    position: absolute;
    right: 0;
    top: 0;
  }

  &__bar {
    position: relative;

    &:after {
      @offset: 0;
      bottom: @offset;
      content: '';
      display: block;
      left: @offset;
      position: absolute;
      right: @offset;
      top: @offset;
      transition: background-color @animation;

      .html_light & {
        background-color: @c-black-8;
      }

      .html_dark & {
        background-color: @c-white-5;
      }
    }

    &_h {
      height: 100% !important;
    }

    &_v {
      width: 100% !important;
    }
  }

  &_scrollbar_h &__track_h {
    display: block;
  }

  &_scrollbar_v &__track_v {
    display: block;
  }

  &__control {
    display: none;
  }
}
